<template>
  <div class="appointRecords">

    <el-table :data="recordList" width="100%" max-height="50vh" style="overflow:auto">
      <el-table-column width="120px" label="操作类型">
        <template slot-scope="scope">
          <span>【{{scope.row.recordName}}】</span>
        </template>
      </el-table-column>
      <el-table-column width="300" label="操作说明" align="center">
        <template slot-scope="scope">
          <span>{{scope.row.recordContent}}</span>
        </template>
      </el-table-column>
      <el-table-column width="100" label="操作人" align="center">
        <template slot-scope="scope">
          <span>{{scope.row.createUserName}}({{formatUserRole(scope.row.userRole)}})</span>
        </template>
      </el-table-column>
      <el-table-column width="160" label="操作时间" align="center">
        <template slot-scope="scope">
          <span>{{scope.row.createDate}}</span>
        </template>
      </el-table-column>
      <!--<el-table-column v-if="productPlatformType!=='shopify'" width="120"
        :label="productOnlinetype || productPlatformType==='lazada'?'操作':'状态'" align="center">
        <template slot-scope="scope">
          <span style="cursor: pointer;" class="text-primary" @click="productUpshelf(scope.row)"
            v-if="scope.row.status === 'inactive'">上架</span>
          <span style="cursor: pointer;" class="text-danger" @click="productSoldout(scope.row)"
            v-if="scope.row.status === 'active'">下架</span>
          <span style="cursor: pointer;" class="text-primary" @click="productUpshelf(scope.row)"
            v-if="productOnlinetype?scope.row.enabled === false:scope.row.enabled === true">上架</span>
          <span style="cursor: pointer;" class="text-danger" @click="productSoldout(scope.row)"
            v-if="productOnlinetype?scope.row.enabled === true:scope.row.enabled === false">下架</span>
          <span class="text-danger" v-if="scope.row.enabled === undefined && productPlatformType!=='lazada'">未更新</span>
        </template>
      </el-table-column>-->
    </el-table>
    <!--<div class="variant_btn">
      <el-button type="" size="mini" @click="handleCancelcategory">取消</el-button>
      <el-button type="primary" size="mini" @click="handleAddcategory">确定</el-button>
    </div>-->
  </div>
</template>
<script>
  export default {
    name: 'appointRecords',
    props: {
      recordList: {
        type: Array,
        default: () => []
      }
    },
    watch: {
      /*productOnline(val) {
        this.productOnlinetype = val
      },*/
    },
    created() {

    },
    data() {
      return {
        //recordList: [],

      }
    },
    methods: {
      formatUserRole(cellValue) {
        if(cellValue == 1){
          return "系统";
        }else if(cellValue == 2){
          return "医生";
        }else if(cellValue == 3){
          return "医检";
        }
      }
    }
  }
</script>
<style lang="scss">
  .variant-input {
    margin-top: 2px
  }

  .appointRecords .country_ul {
    position: relative;
  }

  .country_ul .country_tabs {
    float: left;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
    margin-bottom: -4px;
  }

  .country_ul .country_tabs li {
    float: left;
    cursor: pointer;
    background-color: #eee;
    width: 60px;
    height: 35px;
    margin-right: 5px;
    border: 1px solid #ddd;
    border-radius: 6px;
  }

  .country_ul .country_tabs .active {
    background-color: #fff;
  }

  .country_ul .country_tabs li a {
    span {
      line-height: 30px;
      margin-left: 15px;
    }
  }

  .variant_btn {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }
</style>
